<template>
  <span>
    <el-badge :value="this.msgObject.notReadCnt || 0"
              :max="99">
      <i class="el-icon-bell" @click="gotoNotice"></i>
    </el-badge>
    
  </span>
</template>

<script>
import { mapGetters } from 'vuex';
export default {
  data() {
    return {
      box: false,
      websock: null,
    }
  },
  created() {
    //this.initWebSocket();
  },
  computed: {
    ...mapGetters(['msgObject'])
  },
  destroyed() {
    //this.websock.close() //离开路由之后断开websocket连接
  },
  methods: {
    gotoNotice(){
      this.$router.push({ path: '/notice/index'});
    }
  },
}
</script>
<style>
</style>
